package com.wanmait.baohan.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wanmait.baohan.pojo.Department;
import com.wanmait.baohan.pojo.Staff;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface StaffMapper extends BaseMapper<Staff>{
    int deleteByPrimaryKey(Integer id);
    @Override
    int insert(Staff record);

    int insertSelective(Staff record);

    Staff selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Staff record);

    int updateByPrimaryKey(Staff record);

    //高文强  查询所有员工的信息、部门、岗位
    List<Staff> selectAll();

    //高文强  查询所有员工的名字
    List<Staff> selectAllName();


    //高文强  查询所有员工的信息和部门
    List<Staff> selectAllDepartment(@Param("name") String name,@Param("department") String department);

    //员工详情
    Staff findOneById(@Param("id") Integer id);
    //根据员工id查找部门
    List<Department> findDepartmentsById(Integer id);

    Staff selectByNameAndPassword(@Param("name")String name, @Param("password")String password);

    Staff selectByJobNumber(String jobNumber);

    List<Staff> selectInitiateProjectMember(Integer id);


}